package com.gnrsoft.springcloud.service.feign.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.gnrsoft.springcloud.service.feign.service.impl.SchedualServiceHiHystric;

//Feign是自带断路器的，在D版本的Spring Cloud中，它没有默认打开。
//需要在配置文件中配置打开它    feign.hystrix.enabled: true
@FeignClient(value = "service-hi", fallback = SchedualServiceHiHystric.class)
public interface SchedualServiceHi {

	@RequestMapping(value = "/hi", method = RequestMethod.GET)
	String sayHiFromClientOne(@RequestParam(value = "name") String name);

}
